<?php
use Biz\service\GoodsDetail as sGoodsDetail;
use Doraemon\tools\HhzClient as tHhzClient;
use Biz\service\theParagraph\Store as sStore;
use Biz\tools\GoodsExposureLog;
/**
 * @deprecated
 */
class FavListAction extends ActionPlugin
{
	const TAB_TYPE_GOODS = 2;
	const TAB_TYPE_ROOM = 1;

	public function main()
	{
		$tab = $this->getRequest()->getQuery('tab', 1);
		$page = $this->getRequest()->getQuery('page', 1);

		if ($tab == self::TAB_TYPE_GOODS) {
			$favList = sGoodsDetail::GoodsFavoriteList($this->uid, 0, $page, tHhzClient::APPTYPE_PARAGRAPH_MINIPROGRAM);
		} else if ($tab == self::TAB_TYPE_ROOM) {
			$favList = sStore::collocationsFavList($this->uid, $page,tHhzClient::APPTYPE_PARAGRAPH_MINIPROGRAM);
		}

		$this->setSuccess($favList);

        GoodsExposureLog::addLog($this->getRequest(), $favList);

	}
}